<template>
      <div class="bank">
    <div class="bank_top">
      <div class="bank_inline">
        <span class="bank_search"
          ><el-input v-model="input" placeholder="搜索人员"></el-input
        ></span>
      </div>

      <div class="bank_selet" v-show="this.multipleSelection.length != 0">
        <span>
          <el-select
            v-model="value"
            :placeholder="cipplaceholder"
            @change="del"
          >
            <el-option key="删除" label="删除" value="删除">
            </el-option> </el-select
        ></span>
      </div>
    </div>
    <!-- <h2 class="listTitle">{{tableData[0].title}}</h2> -->
    <div class="bank_cent">
      <el-table
        :data="mineExam"
        style="width: 100%"
        ref="multipleTables"
        :header-cell-style="{ background: '#F0F0F0' }"
      >
        <el-table-column type="index" width="50" label="序号" align="center"></el-table-column>
        <el-table-column align="center" prop="mineName" label="矿名">
        </el-table-column>
        <el-table-column align="center" prop="count" label="考试人数">
        </el-table-column>
        <!-- <el-table-column align="center" prop="maxScore" label="最高分数">
          <template slot-scope="scope">
            {{(scope.row.maxScore == null?0:scope.row.maxScore)}}
          </template>
        </el-table-column>
        <el-table-column align="center" prop="nickName" label="是否通过">
          <template slot-scope="scope">
            {{scope.row.passed?"通过":"未通过"}}
          </template>
        </el-table-column> -->
        <el-table-column align="center" prop="address" label="操作">
          <template slot-scope="scope">
            <el-button size="small" icon="el-icon-s-promotion" type="primary" @click="showHuman(scope.row.members)"
              >考试人员</el-button
            >
          </template>
        </el-table-column>
      </el-table>
    </div>
    
  </div>
  </template>
  
  <script>
  import { examMemberGetList } from "@/api/bank";
  export default {
    data() {
      return {
        input: "",
        currentPage:1,
        dialogVisible: false,
        ruleForm: {
          name: "",
          remarks: "",
        },
        rules: {
          name: [
            { required: true, message: "题库名称不能为空", trigger: "blur" },
          ],
        },
        mineExam: [],
        dialogData:[],
        multipleSelection: [],
        value: "",
      };
    },
    computed: {
      cipplaceholder() {
        return this.multipleSelection.length
          ? `已选${this.multipleSelection.length}项`
          : "111";
      },
    },
    created() {
      this.getData();
    },
    methods: {
      async getData() {
       this.mineExam = this.$store.state.mineExam
      },
      del(e) {
        this.value = "";
        this.$confirm("确实要删除吗??", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        })
          .then(() => {
            this.$message({
              type: "success",
              message: "删除成功!",
            });
          })
          .catch(() => {
            this.$message({
              type: "info",
              message: "已取消删除",
            });
          });
      },
      showHuman(data){
        console.log(data);
        this.$store.state.examHumanData = data;
        this.$router.push('/modify/examHuman')
      },


      examDetail(data) {
        console.log(data);
        this.dialogData = data;
        this.dialogVisible = true;
      },
      handleClose(){
        this.dialogVisible = false
        console.log(22);
      },
      handleSelectionChange(val) {
        console.log(val);
        this.multipleSelection = val;
      },
      handleCurrentChange(){
        console.log(1);
      },
      submitForm(formName) {
        this.$refs[formName].validate((valid) => {
          if (valid) {
            alert("submit!");
          } else {
            console.log("error submit!!");
            return false;
          }
        });
      },
      resetForm(formName) {
        this.$refs[formName].resetFields();
        this.dialogVisible = false;
      },
    },
  };
  </script>
  
  <style lang="scss" scoped>
  .bank {
    width: 100%;
    height: 100%;
    background: #fff;
    padding: 10px 10px;
    .bank_top {
      width: 100%;
      .bank_inline {
        width: 100%;
        .bank_search {
          width: 200px;
          display: inline-block;
          margin-bottom: 10px;
        }
      }
    }
    .bank_selet {
      span {
        width: 130px;
        display: inline-block;
        margin-top: 10px;
        margin-bottom: 10px;
      }
    }
    .bank_cent {
      width: 100%;
      margin-top: 10px;
      .pagina {
        margin-top: 50px;
      }
    }
  }
  .listTitle{
    text-align: left;
    font-weight: 700;
    color: #999;
  }
  </style>
  